package com.bskms.mapper;

import com.bskms.bean.Message;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MessageMapper {
    // 保存消息
    void save(Message message);

    // 查询历史消息
    @Select("SELECT * FROM message ORDER BY id DESC LIMIT 10")
    List<Message> findLatestMessages();
}
